var vue = require('vue-loader');
var webpack = require('webpack');
var entry=[ './src/main.js'];
module.exports = {
    entry: entry,
    output: {
        path: './dist',
        publicPath: '/dist/',
        filename: 'build.js'
    },
    module: {
        loaders: [{
            test: /\.vue$/,
            loader: 'vue'
        }, {
            test: /\.(png|jpg|gif)$/,
            loader: "url-loader?mimetype=image/png"
        }, {
            test: /\.js$/,
            // excluding some local linked packages.
            // for normal use cases only node_modules is needed.
            exclude: /node_modules|vue\/src|vue-router\/|vue-loader\/|vue-hot-reload-api\//,
            loader: 'babel'
        }]
    },
    babel: {
        presets: ['es2015'],
        plugins: ['transform-runtime']
    },
    plugins: [
        new webpack.ProvidePlugin({
            '$': "webpack-zepto"
        }),
        new webpack.DefinePlugin({
              'process.env': {
                NODE_ENV: '"development"'
              }
            }),
        // new webpack.DefinePlugin({
        //   'process.env': {
        //     NODE_ENV: '"production"'
        //   }
        // }),
        // new webpack.optimize.UglifyJsPlugin({
        //     compress: {
        //         warnings: false
        //     }
        // }),
        new webpack.optimize.OccurenceOrderPlugin()

    ]
}
